﻿/*
	* Project	: SharePoint Dynamic Forms
	* Version	: 1.0
	* Company	: SharePoint Frontier Software Pvt Ltd. (http://www.sharepointfrontier.com)
	* Author	: Ashok Raja .T (Blog : http://www.ashokraja.me)
	* Licence	: Published under Microsoft Public License (Ms-PL)
*/
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace SFS.SharePoint.DynamicForms
{
    public partial class DynamicFormEditorPart : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            SetDisplay();

        }

        protected void ddlRenderType_SelectedIndexChanged(object sender, EventArgs e)
        {
            SetDisplay();
        }

        private void SetDisplay()
        {
            imgLogo.Src = GenericHelper.CombineUrl("/_layouts/images/SFS.SharePoint.DynamicForms/logo.png");
            if (ddlRenderType.SelectedIndex == 0)
            {
                t1.Visible = true;
                t2.Visible = false;
            }
            else
            {
                t1.Visible = false;
                t2.Visible = true;
            }
            ctlErr.Visible = false;
        }
    }
}
